package com.bmps.springcloud.insuredmicroservice.model.trail.request;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;

/**
 * @Author :  zlc
 * @Date : 2019/9/10 10:35
 **/
public class TrailRequestModel implements Serializable {
    
    private TrailPolicyInfoModel policyInfo;

    private TrailCustInfoModel custInfo;

    private TrailProductInfoModel productInfo;

    public TrailPolicyInfoModel getPolicyInfo() {
        return policyInfo;
    }

    public void setPolicyInfo(TrailPolicyInfoModel policyInfo) {
        this.policyInfo = policyInfo;
    }

    public TrailCustInfoModel getCustInfo() {
        return custInfo;
    }

    public void setCustInfo(TrailCustInfoModel custInfo) {
        this.custInfo = custInfo;
    }

    public TrailProductInfoModel getProductInfo() {
        return productInfo;
    }

    public void setProductInfo(TrailProductInfoModel productInfo) {
        this.productInfo = productInfo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}

        if (o == null || getClass() != o.getClass()) {return false;}

        TrailRequestModel that = (TrailRequestModel) o;

        return new EqualsBuilder()
                .append(policyInfo, that.policyInfo)
                .append(custInfo, that.custInfo)
                .append(productInfo, that.productInfo)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(policyInfo)
                .append(custInfo)
                .append(productInfo)
                .toHashCode();
    }

    @Override
    public String toString() {
        return "TrailRequestModel{" +
                "policyInfo=" + policyInfo +
                ", custInfo=" + custInfo +
                ", productInfo=" + productInfo +
                '}';
    }
}
